# coding:utf8

from appserver import db_store
from sqlalchemy.orm import relationship, backref


"""
站点表
"""


class Point(db_store.Model):
    __tablename__ = "points"
    __bind_key__ = "main"

    # autoincrement=True,
    id = db_store.Column(db_store.Integer, primary_key=True, comment=u'站点编号')
    lng = db_store.Column(db_store.String(64), comment=u'经度')
    lat = db_store.Column(db_store.String(32), comment=u"纬度")


    def __repr__(self):
        return "<Point %s>" % self.id

    def get_list_all(self):
        return self.query.all()